package com.android.c2dm;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.widget.TextView;

import com.fancon.android.gardenjokesx.R;

public class MessageReceivedActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.activity_result);
		SharedPreferences prefs = PreferenceManager
				.getDefaultSharedPreferences(this);
		String message = prefs.getString("payload", "no exits!");
//		Bundle extras = getIntent().getExtras();
//		if (extras != null) {
//			String message = extras.getString("payload");
			if (message != null && message.length() > 0) {
				TextView view = (TextView) findViewById(R.id.result);
				view.setText(message);
				Log.d("Notify",message); 
			}
//		}

		super.onCreate(savedInstanceState);
	}

}
